home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet internetowy / Rozne / HTTrack 3.40-2 / httrack-3.40-2.exe / {app} / src / htsdefines.h < prev    next >
C/C++ Source or Header  |  2005-06-11  |  6KB  |  118 lines

  1. /* ------------------------------------------------------------ */
  2. /*
  3. HTTrack Website Copier, Offline Browser for Windows and Unix
  4. Copyright (C) Xavier Roche and other contributors
  5.  
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  
  20.  
  21. Important notes:
  22.  
  23. - We hereby ask people using this source NOT to use it in purpose of grabbing
  24. emails addresses, or collecting any other private information on persons.
  25. This would disgrace our work, and spoil the many hours we spent on it.
  26.  
  27.  
  28. Please visit our Website: http://www.httrack.com
  29. */
  30.  
  31.  
  32. /* ------------------------------------------------------------ */
  33. /* File: Some defines for httrack.c and others                  */
  34. /* Author: Xavier Roche                                         */
  35. /* ------------------------------------------------------------ */
  36.  
  37. // Fichier librairie .h
  38. #ifndef HTS_DEFINES_DEFH
  39. #define HTS_DEFINES_DEFH
  40.  
  41. typedef void  (* t_hts_htmlcheck_init)(void);
  42. typedef void  (* t_hts_htmlcheck_uninit)(void);
  43. typedef int   (* t_hts_htmlcheck_start)(httrackp* opt);
  44. typedef int   (* t_hts_htmlcheck_end)(void);
  45. typedef int   (* t_hts_htmlcheck_chopt)(httrackp* opt);
  46. typedef int   (* t_hts_htmlcheck_process)(char** html,int* len,char* url_adresse,char* url_fichier);
  47. typedef int   (* t_hts_htmlcheck)(char* html,int len,char* url_adresse,char* url_fichier);
  48. typedef char* (* t_hts_htmlcheck_query)(char* question);
  49. typedef char* (* t_hts_htmlcheck_query2)(char* question);
  50. typedef char* (* t_hts_htmlcheck_query3)(char* question);
  51. typedef int   (* t_hts_htmlcheck_loop)(lien_back* back,int back_max,int back_index,int lien_tot,int lien_ntot,int stat_time,hts_stat_struct* stats);
  52. typedef int   (* t_hts_htmlcheck_check)(char* adr,char* fil,int status);
  53. typedef int   (* t_hts_htmlcheck_check_mime)(char* adr,char* fil,char* mime,int status);
  54. typedef void  (* t_hts_htmlcheck_pause)(char* lockfile);
  55. typedef void  (* t_hts_htmlcheck_filesave)(char* file);
  56. typedef void  (* t_hts_htmlcheck_filesave2)(char* hostname,char* filename,char* localfile,int is_new,int is_modified,int not_updated);
  57. typedef int   (* t_hts_htmlcheck_linkdetected)(char* link);
  58. typedef int   (* t_hts_htmlcheck_linkdetected2)(char* link, char* tag_start);
  59. typedef int   (* t_hts_htmlcheck_xfrstatus)(lien_back* back);
  60. typedef int   (* t_hts_htmlcheck_savename)(char* adr_complete,char* fil_complete,char* referer_adr,char* referer_fil,char* save);
  61. typedef int   (* t_hts_htmlcheck_sendhead)(char* buff, char* adr, char* fil, char* referer_adr, char* referer_fil, htsblk* outgoing);
  62. typedef int   (* t_hts_htmlcheck_receivehead)(char* buff, char* adr, char* fil, char* referer_adr, char* referer_fil, htsblk* incoming);
  63.  
  64. /* Library internal definictions */
  65. #ifdef HTS_INTERNAL_BYTECODE
  66. // demande d'interaction avec le shell
  67. #if HTS_ANALYSTE
  68. extern char HTbuff[2048];
  69. extern t_hts_htmlcheck_init       hts_htmlcheck_init;
  70. extern t_hts_htmlcheck_uninit     hts_htmlcheck_uninit;
  71. extern t_hts_htmlcheck_start      hts_htmlcheck_start;
  72. extern t_hts_htmlcheck_end        hts_htmlcheck_end;
  73. extern t_hts_htmlcheck_chopt      hts_htmlcheck_chopt;
  74. extern t_hts_htmlcheck_process    hts_htmlcheck_preprocess;
  75. extern t_hts_htmlcheck_process    hts_htmlcheck_postprocess;
  76. extern t_hts_htmlcheck            hts_htmlcheck;
  77. extern t_hts_htmlcheck_query      hts_htmlcheck_query;
  78. extern t_hts_htmlcheck_query2     hts_htmlcheck_query2;
  79. extern t_hts_htmlcheck_query3     hts_htmlcheck_query3;
  80. extern t_hts_htmlcheck_loop       hts_htmlcheck_loop;
  81. extern t_hts_htmlcheck_check      hts_htmlcheck_check;
  82. extern t_hts_htmlcheck_check_mime hts_htmlcheck_check_mime;
  83. extern t_hts_htmlcheck_pause      hts_htmlcheck_pause;
  84. extern t_hts_htmlcheck_filesave   hts_htmlcheck_filesave;
  85. extern t_hts_htmlcheck_filesave2  hts_htmlcheck_filesave2;
  86. extern t_hts_htmlcheck_linkdetected hts_htmlcheck_linkdetected;
  87. extern t_hts_htmlcheck_linkdetected2 hts_htmlcheck_linkdetected2;
  88. extern t_hts_htmlcheck_xfrstatus  hts_htmlcheck_xfrstatus;
  89. extern t_hts_htmlcheck_savename   hts_htmlcheck_savename;
  90. extern t_hts_htmlcheck_sendhead   hts_htmlcheck_sendhead;
  91. extern t_hts_htmlcheck_receivehead hts_htmlcheck_receivehead;
  92. #endif
  93.  
  94. #if HTS_ANALYSTE
  95. #define HT_PRINT(A) strcatbuff(HTbuff,A);
  96. #define HT_REQUEST_START HTbuff[0]='\0';
  97. #define HT_REQUEST_END 
  98. #define HTT_REQUEST_START HTbuff[0]='\0';
  99. #define HTT_REQUEST_END 
  100. #define HTS_REQUEST_START HTbuff[0]='\0';
  101. #define HTS_REQUEST_END 
  102. #define HTS_PANIC_PRINTF(S) strcpybuff(_hts_errmsg,S);
  103. #else
  104. #define HT_PRINT(A) printf("%s",A);
  105. #define HT_REQUEST_START /*printf("º\n");*/
  106. #define HT_REQUEST_END   /*printf("º\n");*/
  107. #define HTT_REQUEST_START /*if (httrack.shell) printf("º\n");*/
  108. #define HTT_REQUEST_END   /*if (httrack.shell) printf("º\n");*/
  109. #define HTS_REQUEST_START if (opt->shell) { HT_REQUEST_START }
  110. #define HTS_REQUEST_END   if (opt->shell) { HT_REQUEST_END }
  111. #define HTS_PANIC_PRINTF(S) printf("%s\n",S);
  112. #endif
  113.  
  114. #endif
  115.  
  116. #endif
  117.  
  118.